import { PropertyReference, LinkToCopilotCloud } from "@/components";

import { Tabs } from "nextra/components";

import { Callout } from "nextra/components";

# GroqAdapter

Copilot Runtime adapter for OpenAI.
 
## Example
 
```ts
import { CopilotRuntime, GroqAdapter } from "@copilotkit/runtime";
import { Groq } from "groq-sdk";
 
const groq = new Groq({ apiKey: process.env["GROQ_API_KEY"] });
 
const copilotKit = new CopilotRuntime();
 
const serviceAdapter = new GroqAdapter({ groq, model: "<model-name>" });
 
return copilotKit.streamHttpServerResponse(req, res, serviceAdapter);
```

## Constructor Parameters

<PropertyReference name="groq" type="Groq"  > 
An optional Groq instance to use.
</PropertyReference>

<PropertyReference name="model" type="string"  > 
The model to use.
</PropertyReference>

